package ve.ucv.patologiaocular.action;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ActionContext;
import java.util.Map;

public class LogoutAction extends ActionSupport {
	private Map<String, Object> session;
	
	private static final long serialVersionUID = -4901097198092626247L;
	
	public LogoutAction() {
		
	}
	
	public String cerrarSesion() throws Exception { 
		session = ActionContext.getContext().getSession();
		session.remove("logged-in");
		session.remove("User");
		session.remove("Rol");
		return SUCCESS;
	}

	public Map<String, Object> getSession() {
		return session;
	}

	public void setSession(Map<String, Object> session) {
		this.session = session;
	}
}
